package structureType.flyweight.simple;

public class Main {
    public static void main(String[] args) {

        FlyWeightFactory factory = new FlyWeightFactory();
        // name1和name2享元
        String name1 = "范红星";
        String name2 = "范红星";
        String name3 = "毕文秀";

        factory.setFlyWeight(name1);
        factory.setFlyWeight(name2);
        factory.setFlyWeight(name3);

        System.out.println(factory.getSize());
    }
}